<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
		<link href="../css/mui.css" rel="stylesheet" />
		<link href="../css/common.css" rel="stylesheet" />
		<style>
			iframe{
				width: 100%;
				height: 100%;
				border: 0;
				padding:0;
				margin: 0;
			}
			/*toast信息提示*/  
			.mui-toast-container {bottom: 50% !important;}  
		</style>
	</head>
	<body>
		<header class="mui-bar mui-bar-nav xq-window-header">
			<a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"></a>
			<h1 class="mui-title"></h1>
		</header>
		<div class="mui-content">
			<iframe id="xiaobing-frame" src=""></iframe>
		</div>
		<script src="../js/mui.js"></script>
		<script src="../js/jquery-3.3.1.js"></script>
		<script src="../js/commonUtils.js"></script>
		<script type="text/javascript">
			mui.init();
			mui.ready(function(){
				if (mui.os.plus) {
					return;
				}
				//SettingInfoManager.timeCheckAndSetPageFontFromSetting("msXiaobingPoem");
				SettingInfoManager.setPageFontFromSetting();
				initEleSize();
			});
			mui.plusReady(function () {
				var self=plus.webview.currentWebview();//创建一个新的页面
				var toPageUrl=self.toPageUrl;
				var title = self.title;
				SettingInfoManager.setPageFontFromSetting();
				initEleSize();
				initRemotePage(toPageUrl,title)
			});
			function initEleSize(){
				var winH=$(window).height();
				$('#xiaobing-frame').css('height',(winH-49)+'px');
			}
			function initRemotePage(toPageUrl,title){
				if(title){
					$('.xq-window-header .mui-title').html(title);
				}
				var realPageUrl=toPageUrl;
				if(!realPageUrl.startsWith('http') && !realPageUrl.startsWith('https')){
					var addSplit='';
					if(!realPageUrl.startsWith('/')){
						addSplit='/';
					}
					realPageUrl = getShiciServiceHost() + addSplit + realPageUrl;
				}
				$("#xiaobing-frame").attr('src',realPageUrl);
			}
		
		</script>
	</body>
</html>
